To upload a pre-deployed Groovy Plug-in:
Copy the groovy file to one of the '${module}/conf/runtime/groovyplugins' directory. For example, if the module is inventory, copy it to 'inventory/conf/runtime/groovyplugins' dir.
Build the application so that all the groovy files within '${module}/conf/runtime/groovyplugins' get copied to apex build dir.
Launch the application; you should be able to see all the uploaded groovy files as 'Pre-Deployed' plug-ins.
The user will not be able to modify the 'Pre-Deployed' code. It will be a view only field.
User will not not be able to delete the pre-deployed groovy plug-in.